import request from "@/utils/request";
import {
  ReqsignAgreement,
  ReqLogindata,
  ReqVerificationCode,
  ReqhasSigned,
} from "@/types/longtype";

// 查询是否签署协议
export function hasSigned(data: ReqhasSigned) {
  return request({
    url: "/api/auth/userAgree/queryUserAgree",
    method: "post",
    data,
  });
}
//签署协议接口
export function signAgreement(data: ReqsignAgreement) {
  return request({
    url: "/api/auth/userAgree/addUserAgree",
    method: "post",
    data,
  });
}
// 登录接口,
export function loginApi(data: ReqLogindata) {
  return request({
    url: "/api/auth/user/phone/reg",
    method: "post",
    data,
  });
}
// 获取协议接口
export function getAgreen() {
  return request({
    url: "/api/official/contract/protocol",
    method: "post",
  });
}

//获取验证码
export function getVerificationCode(data: ReqVerificationCode) {
  return request({
    url: "/api/auth/user/sendSms",
    method: "post",
    data,
  });
}
